package com.msun.service;

import com.msun.entity.PageResult;
import com.msun.entity.QueryPageBean;
import com.msun.entity.Result;
import com.msun.pojo.Member;

import java.util.List;
import java.util.Map;

public interface MemberService {
    //根据手机号查询会员
    public Member findByTelephone(String telephone);
    public void add(Member member);
    public List<Integer> findMemberCountByMonths(List<String> months);
    // 更新会员信息
    public void update(Member member);
    // 保存密码
    public Result savePwd(Map<String,String> map);
    public List<Map<String,Object>> findHistorySetmeal(Map<String,Object> map);

    List<Map<String, Object>> findMemberAge();
    List<Map<String, Object>> findSetmealIncomeByDate(String dBegin, String dEnd);
    Member findMemberById(Integer id);
    Member findMemberByMemberId(Integer id);

    /**
     * 查询分页的会员信息
     * @param queryPageBean 查询条件
     * @return 分页数据
     */
    PageResult findPage(QueryPageBean queryPageBean);

    /**
     * 新增会员
     * @param member 会员信息
     */
    void addMember(Member member);

    /**
     * 编辑会员
     * @param member 会员信息
     */
    void edit(Member member);

    /**
     * 删除会员信息
     * @param id 会员id
     */
    void delete(Integer id);
    Member findByPhone(String tel);
}
